package com.example.myapplication;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.Button;
import android.widget.TextView;

public class Main2Activity extends AppCompatActivity {
    private TextView msg;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);
        //创建组件对应的对象
        msg = (TextView) findViewById(R.id.qwe);
        //新④ 用 Intent 对象接受并处理数据
        Intent intent = getIntent();
        msg.setText("欢迎 【 " + intent.getStringExtra("msg") + "】同学！  ");
    }
}